package com.cxx.mapper;

import com.cxx.pojo.Blog;
import com.cxx.pojo.Comments;
import com.cxx.pojo.Replay;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface BlogsMapper {
    void addBlogs(Blog blog);

    List<Blog> blogs(String account);

    List<Blog> blogsByTag(String account, String tag);

    List<Blog> blogsList();

    Blog blogById(Integer id);

    void writeComment(Comments comments);

    List<Comments> getComments(Integer id);

    List<Replay> getReply(Integer id);

    void writeReplay(Replay replay);

    List<Comments> getAllComment();

    boolean existComment(Integer id);

    void insertReadComment(Integer id, String account, String toCommentAccount);

    List<Replay> getAllReplay();

    boolean existReplay(Integer id);

    void insertReadReplay(Integer id, String account, String toAccount);
}
